import 'package:flutter/material.dart';
import 'package:flutter3/routes/fluro/application.dart';
import 'routes/fluro/fluro_routes.dart';
import 'package:fluro/fluro.dart';

void main() {

  final router = FluroRouter();
  Application.router = router; //一定要先写这行
  RouterManager.configureRoutes(router); //再写这一行，因为我们在application中为给router初始值，如果先使用它肯定报错，所以要先赋值再使用

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      onGenerateRoute: Application.router.generator
    );
  }
}
